package com.lanchetech.user.service;


import com.lanchetech.bean.request.*;
import com.lanchetech.bean.response.*;
import com.lanchetech.bean.vo.*;
import com.lanchetech.common.exception.ResultCodeException;
import com.lanchetech.entity.*;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.RequestBody;

import java.math.BigDecimal;
import java.util.List;


public interface UserService {
    /**
     * 获取用户详情
     *
     * @param user
     * @return
     */
    ResultData<UserDetailResp> getUserDetail(User user);

    ResultData<UserInfo> getUserInfo(User user);

    /**
     * 绑定邀请
     *
     * @param subordinateUserId
     * @param inviteCode
     * @return
     */
    BaseResp bindInviteCode(Long subordinateUserId, String inviteCode,String username);

    BaseResp updatePhone(User user, String phone, String code);

    BaseResp rebindWechat(User user, RegisterReq req);

    ResultData<List<UserAddress>> getUserAddressList(User user);

    BaseResp updateNickname(User user, String nickname);

    BaseResp updateAvatar(User user, String avatar);

    ResultData<UserAddress> getUserAddress(User user, Long id);

    BaseResp editUserAddress(User user, UserAddress userAddress);

    BaseResp deleteUserAddress(User user, Long id);

    ResultData<UserAddress> getMainUserAddress(User user);

    ResultData<BasePageResp<RelationshipResp>> getUserSubordinatePage(User user, RelationshipReq req);

    BaseResp changeUserRelationship(User user, String inviteCode);

    BaseResp updateUserIdCardAndRealName(User user, UserInfo userInfo);

    ResultData<String> getInviteQrcode(User user);

    ResultData<String> getBossInviteQrcode(User user);

    ResultData<MineDetailVO> getMineStatistics(User user);

    BaseResp createTracks(User user, Long spuId);

    BaseResp deleteTracks(User user, Long id);

    ResultData<UserCollection> createCollection(User user, Long spuId);

    BaseResp deleteCollection(User user, Long id);

    ResultData<UserCollection> getCollection(User user, Long spuId);

    ResultData<BasePageResp<CollectionResp>> getCollectionPage(User user, PageReq req);

    ResultData<List<SearchHistory>> getSearchHistory(User user);

    BaseResp createSearchHistory(User user, SearchHistory searchHistory);

    BaseResp clearSearchHistory(User user);

    ResultData<BasePageResp<TracksResp>> getTracksPage(User user, PageReq req);

    ResultData<MoneyInfoResp> getUserMoneyInfo(User user, Byte businessType);

    ResultData<List<UserMoneyStatisticsVO>> getUserMoneyStatistics(User user);

    ResultData<BasePageResp<UserCommissionResp>> getCommissionPage(User user, UserCommissionReq req);

    ResultData<ShareholderVO> getShareholderDetail(User user);

    ResultData<List<IncomeVO>> getMemberAndPartnerIncome(User user,UserGroupReq req);

    ResultData<BasePageResp<Coupon>> getUserCouponPage(User user, PageReq req);

    ResultData<Coupon> getUserCouponDetail(Long id);

    ResultData<String> getStaffCode(User user);

    BaseResp editBusinessCard(BusinessCard req);

    ResultData<BusinessCardVO> getMyBusinessCard(Long userId);

    BaseResp closeUser(User user);

    ResultData<BasePageResp<UserGroupVO>> getUserGroupPage(User user, UserGroupReq req);

    ResultData<BasePageResp<CardFlowVO>> getCardFlowPage(User user, PageReq req);

    ResultData<IdentityResp> getUserIdentity(User user);

    ResultData<GroupVO> getUserGroup(User user, ListByTimeReq req);

    ResultData<IncomeInfoVO> getUserBonusInfo(User user);

    ResultData<IncomeInfoVO> getUserDistributionInfo(User user);

    ResultData<IncomeDetailVO> getIncomeCount(User user, ListByTimeReq req);

    BaseResp createInformation(Information information);

    BaseResp editShopApply(User user, Shop shop);

    ResultData<ShopApply> getShopApply(User user);

    ResultData<CoinCountVO> getCoinCount(User user);

    ResultData<AutomaticFreeListVO> getAutomaticFree(Integer level);

    ResultData<WaitFreeVO> getWaitFree(User user, Integer level);

    ResultData<BasePageResp<BalanceFlow>> getBalanceFlowPage(TimeTypeReq req);

    ResultData<CountVO> getBalanceFlowCount(TimeTypeReq req);

    ResultData<List<BalanceFlowStatisticsVO>> getBalanceFlowStatistics(Byte type);

    ResultData<BalanceFlowCountAndMoneyVO> getBalanceFlowCountAndMoney(TimeTypeReq req);

    ResultData<List<Catalog>> getCatalogList();

    ResultData<List<DirectPushIncomeVO>> getUserCommission(User user);

    ResultData<DirectPushIncomeVO> getTotalUserCommission(User user);

    ResultData<BasePageResp<DirectPushIncomeVO>> getUserCommissionDetailByTimeType(UserCommissionReq req);

    ResultData<IncomeTimeVO> getUserCommissionChange(User user);


    ResultData<List<RankNicknamePerformanceVO>> getRankByType(TimeTypeReq type);

    ResultData<List<RankNicknamePerformanceVO>> getChampionByRankType(Byte identityType);

    ResultData<List<RankNicknamePerformanceVO>> getUserCommissionRank(Byte identityType);

    ResultData<UserAgentCommissionTotalVO> getTotalUserAgentCommission(User user, Byte type);

    ResultData<BasePageResp<AgentCommissionTotalVO>> getAgentCommissionDetailByTimeType(AgentCommissionDetailReq req);

    ResultData<List<IncomeStatisticVo>> getIncomeStatistics(IncomeStatisticReq req);

    ResultData<List<IncomeStatisticVo>> getIncomeStatisticsMonth(User user);

    ResultData<List<OrderStatisticVO>> getOrderStatistics(User user, Byte timeType);

    ResultData<List<RewardQueueVO>> getRewardQueue(User user);

    ResultData<BasePageResp<RewardQueueVO>> getMyRewardQueuePage(User user, RewardQueuePageReq req);

    BaseResp editVoiceSet(User user);

    ResultData<RewardQueue> getLastRewardQueueAudio(User user);

    ResultData<List<UserGroupCommissionVO>> getUserGroupByIdentityType(Byte identityType);

    ResultData<BasePageResp<UserGroupListVO>> getUserGroupMemberByMemberType(MemberTypeReq req);

    ResultData<UserGroupCaptainDetailVO> getUserGroupCaptainDetail(User user);

    ResultData<BusinessCardVO> getUserGroupMemberBusinessCard(Long userId);

    ResultData<Identity> getUserPromotionIdentity(User user);

    ResultData<List<UserDirectPushStatisticsVO>> getUserDirectPushNumberStatistics(User user);

    ResultData<List<PromotionIncomeAndTotalAmountVO>> getPromotionIncomeAndTotalAmount(User user);

    ResultData<List<PromotionIncomeStatisticsVO>> getPromotionIncomeStatistics(User user);

    ResultData<List<HipoConfig>> getPromotionIdentityValue(User user);

    ResultData<List<AvgPromotionIncomeVO>> getAvgPromotionIncome(User user);

    ResultData<List<IncomeTimeVO>> getPromotionIncomeChange(User user);

    ResultData<PromotionAwardDetailVO> getPromotionAwardDetail(User user,Byte type);

    ResultData<List<HistoryAwardVO>> getHistoryAward(User user,Byte type);

    ResultData<List<RewardQueueLatelyVO>> getRewardQueueLately(User user,Byte type);

    BaseResp addShopCollection(ShopCollection shopCollection);

    BaseResp deleteShopCollection(Long shopId);

    ResultData<BasePageResp<ShopCollectionVO>> getShopCollectionPage(PageReq req);

    ResultData<CardFlowStatisticsVO> getCardFlowStatistics(TimeTypeReq req);

    ResultData<List<CardFlow>> getCardFlowRecordRank(TimeTypeReq req);

    ResultData<List<StatisticsVO>> getCardFlowCurrentMonth(Byte type);

    ResultData<List<CommissionByTypeVO>> getMyCommission(User user);

    ResultData<RecommendShopVO> getRecommendShop(User user);

    ResultData<List<MyDirectPushShopVO>> getMyDirectPushShopList(User user);

    ResultData<FreeOrderMoneyVO> getFreeOrderMoney(User user,Byte rewardType);

    ResultData<BasePageResp<FreeOrderListVO>> getFreeOrderPage(PageReq req);

    ResultData<BigDecimal> sumOfCommissionByType(User user, Byte type);

    ResultData<List<PartnerRankVO>> getPartnerRank(PartnerRankReq req);

    ResultData<Boolean> isBossOrOwner();

    ResultData<AreaApplyAreaVO> getAreaApplyList(Long city);

    BaseResp editAreaApply(AreaApplyReq req);

    ResultData<BasePageResp<AreaApplyVO>> getAreaApplyPage(AreaApplyPageReq req);

    BaseResp cancelAreaApply(Long id);

    ResultData<AreaApplyVO> getAreaApplyDetail(Long id);

    BaseResp deleteAreaApply(Long id);

    BaseResp editSuggestion(Suggestion req);

    ResultData<BasePageResp<DayCommissionVO>> getDayCommissionPage(PageReq req);

    ResultData<BasePageResp<StatisticsVO>> getOrderSkuByTimeTypePage(TimeTypeReq req);

    ResultData<AreaHomeStatisticsVO> getAreaHomeStatistics();

    ResultData<BasePageResp<AreaPartnerVO>> getAreaPartnerPage(AreaPartnerPageReq req);

    ResultData<MyGroupVO> getMyGroupStatistics(User user);

    BaseResp switchIdentity(User user, Byte type);

    BaseResp changeBossRelationship(User user, String inviteCode);

    String testAudioUrl();

    BaseResp changePointToCardPoint(BigDecimal amount);

    ResultData<InviteBuyStatisticsVO> getMyInviteFirstBuyStatistics();

    BaseResp transferCardPoint(TransferCardPointReq req);

    ResultData<BasePageResp<GiveIdentityRecordVO>> getMyGiveIdentityRecordPage(GiveIdentityRecordPageReq req);

    BaseResp subscribeFlashSaleSpu(SubscribeRecord req);

    ResultData<BasePageResp<SubscribeRecordVO>> getMySubscribeRecordPage(SubscribeRecordPageReq req);

    BaseResp cancelSubscribeFlashSaleSpu(Long id);

    ResultData<IncomeTimeVO> getMyIncomeChange(User user);

    BaseResp editReport(Report report);

    ResultData<StaticDividendDetailVO> getStaticDividendDetail(TimeRangeReq req);

    ResultData<StaticDividendDetailVO> getMemberDividendDetail(TimeRangeReq req);

    ResultData<SumStaticDividendVO> getTotalStaticDividend();

    ResultData<BasePageResp<DividendOrderVO>> getStaticDividendOrderPage(TimeRangeReq req);

    ResultData<BasePageResp<WithdrawRespVO>> getWithdrawPage(PageReq req);

    ResultData<MemberPrecipitationVO> getMemberDividendPrecipitationDetail();

    ResultData<StaticDividendDetailVO> getDirectorCommissionDetail(TimeRangeReq req);

    ResultData<BasePageResp<UserCommissionResp>> getUserCommissionPage(UserCommissionReq req);

    ResultData<BasePageResp<DividendMemberVO>> getStaticDividendMemberPage(TimeRangeReq req);

    ResultData<BasePageResp<DividendItemVO>> getMemberDividendMemberPage(DividendPageReq req);

    ResultData<BasePageResp<WithdrawRespVO>> getWithdrawRankPage(PageReq req);

    ResultData<BasePageResp<UserCommissionResp>> getAllCommissionPage(UserCommissionReq req);

    ResultData<BasePageResp<UserDetailResp>> getAllUserPage(PageReq req);

    ResultData<BasePageResp<GroupsPerformanceVO>> getGroupsPerformancePage(GroupsPerformancePageReq req);

    ResultData<BasePageResp<ShareholderPerformanceVO>> getShareholderPerformancePage(ShareholderPerformancePageReq req);

    ResultData<BasePageResp<WelfareFlowVO>> getWelfareFlowPage(WelfareFlowPageReq req);

    void testInviteReward(Long superiorId, Long userId);

    ResultData<BasePageResp<TicketVO>> getTicketPage(TicketPageReq req);

    ResultData<TicketVO> getTicketDetail(Long id);

    BaseResp firstAuditTicket(Ticket req);

    BaseResp secondAuditTicket(Ticket req);

    BaseResp applyCelebrity(User user) throws ResultCodeException;

    ResultData<String> getExpertInviteQrcode(User user);
}